package com.ruoyi.system.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 通道对象 sys_channel
 *
 * @author Ericcc
 * @date 2021-02-12
 */
public class SysChannel extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 渠道id */
    private Long channelId;

    /** 渠道编号 */
    @Excel(name = "渠道编号")
    private Integer channelCode;

    /** 接口名称(中文名称） */
    @Excel(name = "接口名称")
    private String channelName;

    /** 接口状态（0.开启，1.关闭） */
    private Integer status;

    /** 通道类型（1.快捷支付） */
    @Excel(name = "通道类型", readConverterExp = "1=.快捷支付")
    private Integer channelTypes;

    /** 通道网关地址 */
    @Excel(name = "通道网关地址")
    private String channelGateway;

    /** 通道页面通知地址 */
    @Excel(name = "通道页面通知地址")
    private String channelCallbackurl;

    /** 通道回调地址 */
    @Excel(name = "通道回调地址")
    private String channelNotifyurl;

    /** 通道appid */
    @Excel(name = "通道appid")
    private String channelAppid;

    /** 通道商户秘钥 */
    @Excel(name = "通道商户秘钥")
    private String channelKey;

    private Integer delFlag;

    /** 通道费率 */
    @Excel(name = "通道费率")
    private BigDecimal channelRate;

    /** 通道用户端显示(0.显示, 1.不显示) */
    private Integer channelUsershow;

    public void setChannelId(Long channelId)
    {
        this.channelId = channelId;
    }

    public Long getChannelId()
    {
        return channelId;
    }
    public void setChannelCode(Integer channelCode)
    {
        this.channelCode = channelCode;
    }

    public Integer getChannelCode()
    {
        return channelCode;
    }
    public void setChannelName(String channelName)
    {
        this.channelName = channelName;
    }

    public String getChannelName()
    {
        return channelName;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setChannelTypes(Integer channelTypes)
    {
        this.channelTypes = channelTypes;
    }

    public Integer getChannelTypes()
    {
        return channelTypes;
    }
    public void setChannelGateway(String channelGateway)
    {
        this.channelGateway = channelGateway;
    }

    public String getChannelGateway()
    {
        return channelGateway;
    }
    public void setChannelCallbackurl(String channelCallbackurl)
    {
        this.channelCallbackurl = channelCallbackurl;
    }

    public String getChannelCallbackurl()
    {
        return channelCallbackurl;
    }
    public void setChannelNotifyurl(String channelNotifyurl)
    {
        this.channelNotifyurl = channelNotifyurl;
    }

    public String getChannelNotifyurl()
    {
        return channelNotifyurl;
    }
    public void setChannelAppid(String channelAppid)
    {
        this.channelAppid = channelAppid;
    }

    public String getChannelAppid()
    {
        return channelAppid;
    }
    public void setChannelKey(String channelKey)
    {
        this.channelKey = channelKey;
    }

    public String getChannelKey()
    {
        return channelKey;
    }
    public void setDelFlag(Integer delFlag)
    {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag()
    {
        return delFlag;
    }
    public void setChannelRate(BigDecimal channelRate)
    {
        this.channelRate = channelRate.stripTrailingZeros();
    }

    public BigDecimal getChannelRate()
    {
        return channelRate;
    }
    public void setChannelUsershow(Integer channelUsershow)
    {
        this.channelUsershow = channelUsershow;
    }

    public Integer getChannelUsershow()
    {
        return channelUsershow;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("channelId", getChannelId())
                .append("channelCode", getChannelCode())
                .append("channelName", getChannelName())
                .append("status", getStatus())
                .append("channelTypes", getChannelTypes())
                .append("channelGateway", getChannelGateway())
                .append("channelCallbackurl", getChannelCallbackurl())
                .append("channelNotifyurl", getChannelNotifyurl())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("channelAppid", getChannelAppid())
                .append("channelKey", getChannelKey())
                .append("delFlag", getDelFlag())
                .append("channelRate", getChannelRate())
                .append("channelUsershow", getChannelUsershow())
                .toString();
    }
}